package com.gxa.modules.sys.entity;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gxa.common.validator.group.AddGroup;
import com.gxa.common.validator.group.UpdateGroup;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;

@Data
@TableName("t_user")
public class User implements Serializable {

    @ApiModelProperty("用户id")
    private Integer id;
    @NotBlank(message="账户不能为空")
    @ApiModelProperty("姓名")
    @TableField("employee_name")
    private String name;


    @ApiModelProperty("用户微信")
    private String wx;
    @ApiModelProperty("用户QQ")
    private String qq;
    @ApiModelProperty("用户邮箱")
    private String mail;

    @NotBlank(message="手机号不能为空")
    @ApiModelProperty("用户手机号")
    @TableField("username")
    private  String phone;

    //账户密码
    @ApiModelProperty("用户账号")
    @NotBlank(message="用户账号不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String username;
    @ApiModelProperty("用户密码")
    @NotBlank(message="密码不能为空", groups = AddGroup.class)
    private String pwd;

    @ApiModelProperty("状态")
    private String state;

//    @ApiModelProperty("路由")
//    private List<Routing> routings;

//    private  int communityId;

//    private String salt;


}
